<script type="text/javascript" src="<?= $this->config->base_url(); ?>assets/js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="<?= $this->config->base_url(); ?>assets/js/jquery-ui.js"></script>
<link rel="stylesheet" href="<?= $this->config->base_url(); ?>assets/css/jquery-ui.css" type="text/css" charset="utf-8" />
<script>
function get_report(from_date,to_date,type){
	

		if(from_date !='' && to_date !=''){
				
						$.post("<?= site_url('admin/expenses/prepare_report')?>",{ from_date: from_date, to_date:to_date, type:type }, function(msg){
							if(msg){
								$("#report").show();
								$("#report").html(msg);	
							}
		
						})
		
	}else{
		
		alert("Select The Date!!")
		return false
	}


		

}

</script>

<div class="row-fluid">
<div class="header">
            
            <h1 class="page-title">Report</h1>
        </div>
        
                <ul class="breadcrumb">
         
          
        </ul>
<div class="span1">&nbsp;&nbsp;&nbsp;</div>
<div class="span10">
<table width="100%" >
<tr>
<td><b>From Date: </b></td>
<td><b>To  Date: </b></td>
<td><b>Select Report Type:</b></td>


</tr>
<tr> 
<td><br>  <input  type="text" data-date-format="yyyy/mm/dd"  class="date1" id="from_date"name="from_date" />
            <span class="add-on">
                <i class="icon-calendar"> </i>
            </span></td>
<td><br><input type="text" data-date-format="yyyy/mm/dd" name="from_date" id="to_date" class="date1"/></td>
<td><br>
		<select id="type"  class="chzn-select" >
		<option value="1">Warranty</option>
		<option value="2">Non-Warranty</option>
			
		</select>
</td>
</tr>

<tr> 
 <td>   
 
 <td>  
 
	</td>
 <td>  
 
 
	</td>
</tr>

<tr><td>&nbsp;</td><tr>
<tr><td>&nbsp;</td><td>&nbsp;</td>
	<td><p align="right"><input type="button" onclick="get_report($('#from_date').val(),$('#to_date').val(),$('#type').val());"   value="Get Report" class="btn btn-inverse"></p></td>
    </tr>
	</table>
	</div>
	<div class="span2">&nbsp;&nbsp;&nbsp;</div>
</div>	
<div class="line"></div>
<div class="row-fluid">
<div class="span12" id="report" style="display: none">
lkhkjthkjtrhekj
</div>	
</div>
<script type="text/javascript">

$(document).ready(function(){
	$('.date1').datepicker({ dateFormat: 'yy-mm-dd' });

	
})

</script>	